<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="pg" uri="http://jsptags.com/tags/navigation/pager" %>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=Edge">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <title>E-TOP在线文档管理系统</title>
        <link rel="stylesheet" href="css/font-awesome.css">
        <link rel="stylesheet" type="text/css" href="css/all-page.css" />
        <link rel="stylesheet" type="text/css" href="css/userManagement.css" />
        <link rel="stylesheet" type="text/css" href="css/show-portrait.css" />   

    </head>

    <body class="all-page userMng home-page
          <c:if test="${not empty loginUser}">logined</c:if>
          <c:if test="${loginUser.role eq 2}">manage-logined</c:if>
              ">
          <jsp:include page="/WEB-INF/inc/header.jsp"/>
          <!--顶部信息-->
          <div class="container">
              <p class="userMngTitle"><span class="fa fa-users fa-fw"></span>用户管理</p>
              <form action="Admindelete" method="post">
                  <table class="userMngForm">
                      <tr>
                          <th class="selects">
                              <!--<span class="fa fa-check fa-fw"></span>选择--></th>
                          <th class="portraits"><span class="fa fa-picture-o fa-fw"></span>头像</th>
                          <th class="user-name"><span class="fa fa-user fa-fw"></span>用户名</th>
                          <th class="mail"><span class="fa fa-envelope-o fa-fw"></span>邮箱</th>
                          <th class="phone"><span class="fa fa-mobile-phone fa-fw"></span>手机</th>
                          <th class="password"><span class="fa fa-keyboard-o fa-fw"></span>密码</th>
                          <th class="operation"><span class="fa fa-gear fa-fw"></span>操作</th>
                      </tr>
                      <c:forEach items="${userList.datas}" var="user">
                          <tr>
                              <td class="td-selects">
                                  <input type="checkbox" name="deleteCheckbox" value="${user.id}">
                              </td>
                              <td class="td-portraits"><img src="${user.headpic}"/></td>
                              <td class="td-user-name">${user.username}</td>
                              <td class="td-mail">${user.email}</td>
                              <td class="td-phone">${user.tele}</td>
                              <td class="td-password">xxxxx</td>
                              <td class="td-operation"><a href="#"><span class="fa fa-pencil fa-fw"></span>修改</a>
                                  <a href="Admindelete/${user.id}"><span class="fa fa-user-times fa-fw"></span>删除</a></td>
                          </tr>
                      </c:forEach>
                  </table>
                  <div class="page-divider">
                      <div class="adjust-delete-button">
                          <button type="button">全选</button>
                          <input class="delete-people" type="submit" value="删除以上选中内容" />
                      </div>
                      <div class="adjust-page-divider">
                          <pg:pager items="${userList.totalRecord }" maxPageItems ="${userList.pageSize}" export="curPage=pageNumber" url="userManagement">
                              <c:forEach items="mothod,name" var="p">
                                  <pg:param name="${p}"/>
                              </c:forEach>
                              <pg:last>
                                  <span>总页数:<span>${pageNumber }</span></span>
                              </pg:last>
                              <pg:first><a href="${pageUrl }" class="pager">首页</a></pg:first>
                              <pg:prev ifnull="true"><a href="${pageUrl }" class="pager"><span class="fa fa-angle-left fa-fw"></span>上一页</a></pg:prev>
                              <pg:pages>
                                  <c:choose>
                                      <c:when test="${curPage eq pageNumber }">【${pageNumber }】</c:when>
                                      <c:otherwise><a href="${pageUrl }" class="pager">${pageNumber }</a></c:otherwise>
                                  </c:choose>
                              </pg:pages>
                              <pg:next ifnull="true"> <a href="${pageUrl }" class="pager">下一页<span class="fa fa-angle-right fa-fw"></span></a></pg:next>
                              <pg:last> <a href="${pageUrl }" class="pager" >尾页</a></pg:last>
                          </pg:pager>
                      </div>
                  </div>
              </form>
          </div>
          <!--用户管理--删除某个用户--调用xxx.js(关键字)-->
          <div class="confirmDelete">
              <div class="delete-names">
                  <div class="adjust-log-del">
                      <span class="fa fa-user-times fa-fw"></span>
                      <span>删除</span>
                  </div>
                  <div class="name-group group-not-one">
                  </div>
              </div>
              <span class="fa fa-close fa-fw closeConfirmDelete"></span>
              <div class="adjust-del-btn">
                  <button class="yes" type="button">确定</button>
                  <button class="no" type="button">取消</button>
              </div>
          </div>
          <div class="mask"></div>
          <script src="js/jquery-1.11.2.js"></script>
          <script src="js/jquery.mCustomScrollbar.concat.min.js"></script>        
          <script src="js/home-page.js"></script>
          <script src="js/jquery.easing.1.3.js"></script>
          <script src="js/userManagement.js"></script>

    </body>
</html>
